<template>
	<Table filter v-bind="tableOpts" v-on="tableEvent">
		<template #operator>
			<div class="operator-wrap">
				<!-- <modifyClassify ref="dialogRef" @change="fetchCurrentTable" /> -->
			</div>
		</template>
	</Table>
</template>

<script>
import modifyClassify from "./components/modifyClassify.vue";
import tableMixins from "@/mixins/tableMixins.vue";
export default {
	name: "ClassifyManage",
	mixins: [tableMixins],
	components: {
		modifyClassify,
	},
	data() {
		return {
			apiName: "getDirectory",
			form: {
				name: {
					tag: "el-input",
					label: "套件名称",
					value: "",
					props: {
						clearable: true,
						placeholder: "请输入套件名称",
					},
				},
			},
		};
	},
	computed: {},
	methods: {
		handleAction(opts, row) {
			const { name, id } = row;
			if (opts === "edit") this.showDialog(opts, row);
			else if (opts === "off")
				this.showConfirm(`确认禁用【${name}】？`, "patchDirectory", {
					status: 0,
					id,
				});
			else if (opts === "on")
				this.showConfirm(`确认开启【${name}】？`, "patchDirectory", {
					status: 1,
					id,
				});
			else if (opts === "delete")
				this.showConfirm(`确认删除【${name}】？`, "deleteDirectory", { id });
		},
	},
};
</script>

<style lang="less" scoped></style>

